// app.js


App({
  
  globalData: {
    scene: '',
    issceneParams: false,
    appId: '',
    url: '',
    VipCode: '',
    userInfo: null, 
    NewVip: null,
    VipParams: null,
    PhoneNumber: '',//当前微信手机号
    curthis: null,
    startConnectedTime: null,
    needLoadingRequestCount: 0, 
    loadingClose: true,
    StationId:0,
    StationNo:'',
    StationName:'',
    BrowserType:0,
    TenantId:0,
    TenantName: '',
    PageName: '',
    OpenId:'',
    SessionKey: '',
    ConnectionStatus:0,
    SaleId:'',
    BillNo:'',
    OpenGateTime: null,
    OpenGateStatus:false,
    
    curPage:'',
    startPay:false,//开始请求支付
    connection:null,
    //算费后
    payPaysource:0,
    payRecordId:0,
    payOpenId:'',
    payPlateNo:'',
    payYS:0,
    paySS:0,
    payMD:0,
    payINTime:'',
    payStopTime:'',
    payStationId:0,
    payEndTime:'',
    payOrderTime:'',
    fromOutGate:"N",
    CDMD:0,
    HYMD:0,
    OverTime:0,
    //算费后计时器
    beginPayTime:null,

    curPlateNo:'',//当前选择车牌
    curPlateColor:1,//当前车牌颜色
    curPayCardTypeId:0,//当前车牌交费类型
    selectBillNos:[],//当前免单券选择值
    canClickticket:true,//允许免单券点击
    canQuestServer:true,//允许请求支付订单
    selectPayType:'',//选择的支付方式
    //扫码交费返回
    hadGateRecvice:false,
    //缴费成功通知次数
    NoticeTimes:0,
    GetStationTimes:0,
    //停车券列表
    ParkingTitckets:[], 
    //计算后
    HYMDSJ: '',
    CDMDSJ: '',
    LocalMD: 0,
    OutTradeNo: '',
    //倒计时时钟
    inter: null,
    //心跳时钟
    interval:null,
    //请求时钟
    interreq: null,
    //连接打开
    isConnectioned: false,
    //已经登录过一次不需要再次登录 app的所有数据都不再初始化
    isAppLogin: false,
    //生成小程序码时钟
    intervalbarcode: null,
  },
  onShow(options){
    console.log("小程序显示");
    // 登录 
  },
  onLaunch() {
    

  },
  getCurrentPages: function(){
    　　var pages = getCurrentPages();    //获取加载的页面
    　　var currentPage = pages[pages.length - 1];  //获取当前页面的对象
    　　var url = currentPage.route;  //当前页面url
    　　var options = currentPage.options;   //获取url中所带的参数
    　　//拼接url的参数
    　　var currentPage= url + '?';
    　　for (var key in options) {
    　　　　var value = options[key]
    　　　　currentPage+= key + '=' + value + '&';
    　　}
    　　currentPage= currentPage.substring(0, currentPage.length - 1);
    　　return currentPage;
  }
})